package xyz.lwm.lazycat.web.annocation;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

@Target({TYPE, METHOD, ANNOTATION_TYPE})
@Retention(RUNTIME)
public @interface Produces {

    /**
     * Specify response media type.
     *
     * <p>When not specified the default MediaType is application/json
     */
    String value() default MediaType.APPLICATION_JSON;

    /**
     * The status code of the route when successful.
     *
     * <p>When not specified, the default status are as follows: <br>
     * GET(200) <br>
     * POST(201) <br>
     * PUT(200, void methods 204) <br>
     * PATCH(200, void methods 204) <br>
     * DELETE(200, void methods 204)
     */
    int statusCode() default 0;

}